<template>
	<view>
		<my-list-item :listData="commonlyData" @gotoItemPage="gotoItemPage"></my-list-item>
	
		<my-release-animation :share="isShowRelease" @display="display"></my-release-animation>
	</view>
</template>

<script>
	import myListItem from './my-list-item.vue'
	import myReleaseAnimation from './my-release-animation.vue'

	import {
		commonlyData
	} from '@/local_data/main/my.js'

	export default {
		components: {
			myListItem,
			myReleaseAnimation
		},
		data() {
			return {
				commonlyData: commonlyData,
				isShowRelease:false
			}
		},
		methods: {
			gotoItemPage(item) {
				this.$isLoginByVisitor()
				if(!uni.getStorageSync('isVisitorLogin')){
					return
				}
				
				if (item.id == 1) {
					//console.log(123)
					//判断是否实名认证 如果没有实名认证无法发布
					if (!uni.getStorageSync('identifyCheck')) {
						return uni.$showMsg('请先进行实名认证！')
					}
					
					this.isShowRelease = true
					return 
				} 
				
				/* else if (item.id == 2) {
					return uni.navigateTo({
						url: '/pages/msg/home/home'
					})
				} */
				
				else if (item.id == 3) {
					//判断是否实名认证 如果没有实名认证无法下单
					if (!uni.getStorageSync('identifyCheck')) {
						return uni.$showMsg('请先进行实名认证！')
					}

					return uni.navigateTo({
						url: '/subpkg/main/my/assets/assets/assets'
					})
				} else if (item.id == 4) {
					return uni.navigateTo({
						url: '/subpkg/main/my/address/address/address'
					})
				} else if (item.id == 5) {
					return uni.navigateTo({
						url: '/subpkg/main/my/set-up/set-up/set-up'
					})
				} else if (item.id == 6) {
					return uni.navigateTo({
						url: '/subpkg/main/my/commonly/identity/identity'
					})
				} else if (item.id == 7) {
					return uni.navigateTo({
						url: '/subpkg/main/my/commonly/feedback/feedback'
					})
				} else if (item.id == 8) {
					return uni.navigateTo({
						url: '/subpkg/main/my/commonly/man-made/man-made'
					})
				} else {
					return
				}
			},
			display(){
				this.isShowRelease = false
			}
		},
		created() {
			//this.commonlyData = commonlyData
		}
	}
</script>

<style>
</style>